__author__ = 'toriycn'

from app.monitors.server.conf.services.linux import *

class ServiceGeneric(object):

    @staticmethod
    def getServiceByCode(name,interval = 0):
        baseService = None
        if name == "linux_cpu":
            baseService = CPU()
        if name == "linux_mem":
            baseService = Memory()
        if interval != 0:
            baseService.interval = interval
        return baseService
